<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="my" uri="http://www.trkj.com/tr1702/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript"
	src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery-easyui-1.5.5.6/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/js/jquery-easyui-1.5.5.6/locale/easyui-lang-zh_CN.js"/>"></script>
<link rel="stylesheet" type="text/css"
	href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/default/easyui.css"/>" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/js/jquery-easyui-1.5.5.6/themes/icon.css"/>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<style>
</style>
<body>
	<script type="text/javascript">
		$(function() {

			$("#ace").linkbutton({
				onClick : function() {
					$('#one').panel({
						href : 'Salaryaccounttj',
					});
				}
			});

			
		});   
		
		/*操作图标*/
		var sroleFormatter = function(value,row,index){
			var wrong ="";
			<my:g id="">   wrong = " <a class='cell_btn_wrong_en' onclick='wrong(" + row.accountId + ")'></a>";</my:g>
			var deit="";
		     <my:g id="124">  edit = " <a class='cell_btn_edit_sw' onclick='editRole(" + row.accountId + ")'>编辑</a>";</my:g>
		     var  del="";
		     <my:g id="">  del = " <a class='cell_btn_del_se' onclick='delRolexz(" + row.accountId + ")'></a>";</my:g>
			return wrong+edit+del;
		}
		/* 操作图标*/
		
 		$("#ea_datagrida").datagrid({onLoadSuccess: function(){
			$(".cell_btn_wrong_en").linkbutton({iconCls:'', plain:true});
			$(".cell_btn_edit_sw").linkbutton({iconCls:'icon-add', plain:true});
			$(".cell_btn_del_se").linkbutton({iconCls:'', plain:true});
		}});
		/*修改*/
		
		var editRole=function(accountId){
			$('.rule_result_update_on').form('load','lzs-bianji?accountId='+accountId); 
			alert("3");
			$('#update-rule_result_we').dialog("open");
		
		}
		$('.search_a').linkbutton({
			onClick : function() {
				$('#ea_datagrida').datagrid({ url:'lzs_findallchaxun?text='+$('#search_input_a').val() });//重新指定url
				$('#ea_datagrida').datagrid('load',{  
                });
			}
		});
			
		/*删除*/
		function delRolexz(accountId){
	 		$.messager.confirm('确认', '您确定要删除吗？', function(v){
	 			if(v){
	 				$.post("hr_ra_form_SalaryAccount", {accountId:accountId}, function(){
						$('.mod-add-data_a').datagrid('reload');
					});
	 			}
				
			});
	 	}
	</script>
<div id="one"  class="easyui-panel" data-options="fit:true,border:false">
		<my:g id="123"><a href="#" id="ace" class="easyui-linkbutton adds" data-options="iconCls:'icon-add',plain:true,text:'新增',iconAlign:'left'"></a>| </my:g>
       <!--  <a href="#" id="update-rule_result"class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true,text:'编辑',iconAlign:'left'"></a>|  -->
        
        
      <!--   <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true,text:'删除',iconAlign:'left'"></a>|  -->
        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true,text:'刷新',iconAlign:'left'"></a>| 
	<!-- <!-- 	日期从<input type= "text" class= "easyui-datebox" /> 到<input type= "text" class= "easyui-datebox" /> --> 	
			 <input id="search_input_a" class="easyui-textbox " data-options="width:120,labelWidth:30"> 
	     <a class="easyui-linkbutton search_a" data-options="iconCls:'icon-search',text:'搜索'"></a>

	<table  id="ea_datagrida"class="easyui-datagrid"
		data-options="
		pagination:true,
		pageSize:1,
		pageList: [1,2,3,4,5],													
		fitColumns:true,
		autoRowHeight:true,
		fit:true,
		nowrap:false,
		rownumbers:true,
		singleSelect:true,
        url:'lzs_findAllduoSalary',
        method:'post',
		striped:true,	
		toolbar:'#tlbar'">
			<thead>
				<tr>
				<!-- 	<th data-options="field:'accountId',width:80,checkbox:true">账套ID</th> -->
					<th data-options="field:'accountId',width:80,align:'center'">账套编号</th>
					<th data-options="field:'accountName',width:80,align:'center'">账套名称</th>	
					<th data-options="field:'templateName',width:80,align:'center'">薪资表模板</th>
				<!-- 	<th data-options="field:'accountNumber',width:80,align:'center'">薪资表数</th> -->
					<th data-options="field:'accountStartdate',width:120,align:'center' ">开始日期</th>
					<th data-options="field:'accountEnddate',width:120,align:'center'">结束日期</th>
			<!-- 		<th data-options="field:'accountRemark',width:150,align:'center'">备注</th> -->
					<th data-options="field:'accountCreatordate',width:150,align:'center'">创建日期</th>
					<!-- <th data-options="field:'accountCreatordate',width:120,align:'center'
				">创建日期</th> -->
					<th data-options="field:'accountStartdat',width:120,align:'center',formatter:sroleFormatter">操作</th>
				</tr>
		</thead>
		<tbody>
		
		
		</tbody>
	</table>
	</div>
	
	
	
	<!-- 修改 -->
	<div id="update-rule_result_we" class="easyui-dialog" title="规则结果"
		data-options="
         width:440,
         height:360,
	     resizable:false,
	     modal:true,
	     closed:true,
	     buttons:[{
				text:'保存',
				width:60,
				handler:function(){
					$('#rule_result_update_on').form({
					    
						url:'lzs_xiugai',
						onSubmit:function(params){
						
						},
						success:function(v){
							v = eval('('+v +')');
							if(v.success){
								$.messager.alert('恭喜', '修改成功');
							}else{
								$.messager.alert('错误', '对不起，操作失败，原因：' + v.message);
							}
						$.messager.progress('close');// 如果提交成功则隐藏进度条
						$('#ea_datagrida').datagrid('reload');
						$('#rule_result_add').form('reset');
						$('#update-rule_result_we').dialog('close');
						}
					}).submit();
				}
				},{
				text:'取消',
				width:60,	
				handler:function(){
					$('#update-rule_result_we').dialog('close');
				}
			}]
        ">
		<div style="margin-left: 21%; margin-top: 10px;">
			<form action="" class="rule_result_update_on" id="rule_result_update_on" style="text-align: right;">
				<table>
					<tr style="display:none;">
						<td><span style="color: red;">*</span>账套编号</td>
						<td><input class="easyui-textbox"
							name="accountId" data-options="required:true" id="rule_result_id_update"></td>
					</tr>
					<tr>
						<td><span style="color: red;">*</span>账套名称</td>
						<td><input class="easyui-textbox"
							name="accountName" data-options="required:true" id="rule_result_name_update"></td>
					</tr>
					<!-- <tr>
						<td><span style="color: red;">*</span>薪资表模板</td>
						<td><input class="easyui-textbox"
							name="templateName" data-options="required:true" id="rule_result_name_update"></td>
					</tr> -->
					<!-- 	<tr>
						<td><span style="color: red;">*</span>薪资表数</td>
						<td><input class="easyui-textbox"
							name="accountNumber" data-options="required:true" id="rule_result_name_update"></td>
					</tr> -->	
					<tr>
						<td><span style="color: red;"> </span>开始日期</td>
						<td><input class="easyui-datetimebox" name="accountStartdate"></td>
					</tr>
					
					<tr>
						<td><span style="color: red;"> </span>结束日期</td>
						<td><input class="easyui-datetimebox" name="accountEnddate"></td>
					</tr>
					
					
						<tr>
						<td><span style="color: red;"> </span>创建日期</td>
						<td><input class="easyui-datetimebox" name="accountCreatordate"></td>
					</tr>
					
					<!-- <tr>
						<td><span style="color: red;"> </span>重复有效</td>
						<td>
							<select id="cfyx-value_update" class="easyui-combobox" class="cfyx"
								name="attruRepeat" style="width: 170px;" data-options="panelHeight:'auto'">
									<option value=""> </option>
									<option value="不考虑">不考虑</option>
									<option value="第一个">第一个</option>
									<option value="最后一个">最后一个</option>
							</select>
						</td>
					</tr>
					<tr>
						<td><span style="color: red">*</span>类别</td> 
						<td><select id="lb-rule_result_update" class="easyui-combobox" class="work_leibie_update"
								name="attruAffair"style="width: 170px;" data-options="panelHeight:'auto'">
									<option value="上班">上班</option>
									<option value="下班">下班</option>
									<option value="无">无</option>
							</select></td>
					</tr> -->
					<!-- <tr>
						<td><span style="color: red;"> </span>备注</td>
						<td><input class="easyui-textbox" name="accountRemark" data-options="height:60,multiline:true" id="rule_result_marks_update"></td>
					</tr> -->
					<tr>
						<td><span style="color: red;"> </span></td>
						<td><span style="padding-right:5px;">停用</span>
						<input name="attruState" type="checkbox" value='1' id="rule_result_check_update">
					</tr>
				</table>
			</form>
		</div>
	</div> 
</body>
</html>



